package com.project.taller2.dao.impl;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.project.taller2.dao.ContactDAO;
import com.project.taller2.obj.Contact;

@Repository
public class ContactDAOImpl extends GenericDaoImpl<Contact> implements ContactDAO {

	@Autowired
	private SessionFactory sessionFactory;
	
	public ContactDAOImpl() {
		super(Contact.class);
	}



//	@Override
//	public Long delete(Contact element) {
//		// TODO ver que pasa cuando elimino algo que no existe
//		sessionFactory.getCurrentSession().delete(element);
//		Contact contact = (Contact) sessionFactory.getCurrentSession().load(
//				Contact.class, id);
//		if (null != contact) {
//			sessionFactory.getCurrentSession().delete(contact);
//		}
//		return element.getId();
//	}


}
